const systemConfig = {
  systemName: '交通仿真辅助决策功能',//系统名称
}

// eslint-disable-next-line no-unused-vars
const aboutConfig = {
  name: '交通仿真辅助决策功能',
  version: 'fzptv1.0',
  aliasName: 'fzpt',
}
//地图地址
const  mapBaseUrl = import.meta.env.VITE_MAP_BASE_URL
const  wsUrl = import.meta.env.VITE_WS_URL

const imgVideoWS = wsUrl + '/tzqxlk/devicePic';//设备的图片展示视频形式
const carWS = wsUrl + '/sim';//全息车流数据
const stageWS = wsUrl + '/tzqxlk/workStatus';//信控阶段状态数据
const lightWS = wsUrl + '/tzqxlk/lightColor';//信控阶段状态数据
const edestrianWS = wsUrl + '/tzqxlk/ws/pedestrian';// 行人感知
const pedestrianWS = wsUrl + '/tzqxlk/ws/pedestrianLight'; // 行人灯杆

/**
 * 地图参数的数据
 */
const mapConfig = {
  rotation: [-90, 0, 5400],//设置地图视角高度
  center: [118.17090594689827, 39.67432249172956],//设置地图中心点
  tk: '2ABCBB47FBE3A622CE8E98172465CF717C68A121903BE4C600DBA76676CCF493A3115AB6A39EA77AB67E59A7C511E1FF',
  minZoom: 500,//设置相机最小高度(离地面近)，单位米
  maxZoom: 50000,//设置相机最大高度(离地面远)，小单位米
  hdr: false,
}

const skyUrl = mapBaseUrl + '/earth/';//蓝天白云地址
const commonStaticField = {
  mapServerType: {
    cacheLayer: 0,
    tiles: 1,
    brightMap3DModel: 2,
    primitiveModel: 3,
    sampleShps: 4,
    terrain: 5,
    imageLayer: 6
  },//不知道干啥的
  //需要确认干啥的
  "scene": {
    "shadows": false,
    "showMoon": false,
    "showSkyAtmosphere": true,
    "groundSkyBox": "clear_sky",
    "showSkyBox": true,
    "showSun": true,
    "fps": true,
    "globe": {
      "baseColor": "#546a53",
      "depthTestAgainstTerrain": false,
      "enableLighting": false,
      "showGroundAtmosphere": true
    }
  },
  "cameraHeight": 1000,
  //设置仰视角
  "mapLocation": {
    "pos": [116.68564, 39.90371, 20],
    "rotation": [-35.62, 359.36, 10000],
    "limitPitch": -0.1
  },
  "tiles": [
    {
      "id": "RoadSection",
      "layertype": 0,
      "layerName": "道路",
      "minheight": 0,
      "maxheight": 2000000,
      "isLayerManager": true,
      "isLayerChecked": true,
      "isMonomer": true,
      "models": [
        {
          "url": mapBaseUrl + "/data/tangshan_smart_ht_crossing/RoadSection/tileset.json",
          "lng": 118.1710063,
          "lat": 39.6742700,
          "alt": 0.15,
          "maximumScreenSpaceError": 0.1,
          "luminanceAtZenith": 0.3,
          "mesh": "路面"
        },
        {
          "url": mapBaseUrl + "/data/tangshan_smart_ht_crossing/CurbStrip/tileset.json",
          "lng": 118.1710024,
          "lat": 39.6742683,
          "alt": 0.22,
          "maximumScreenSpaceError": 0.1,
          "luminanceAtZenith": 0.3,
          "mesh": "路缘石"
        },
        {
          "url": mapBaseUrl + "/data/tangshan_smart_ht_crossing/SafetyIsland/tileset.json",
          "lng": 118.1709542,
          "lat": 39.6741224,
          "alt": 0.31,
          "maximumScreenSpaceError": 0.1,
          "luminanceAtZenith": 0.3,
          "mesh": "安全岛"
        },
        {
          "url": mapBaseUrl + "/data/tangshan_smart_ht_crossing/SepStrip/tileset.json",
          "lng": 118.1714944,
          "lat": 39.6742686,
          "alt": 0.2,
          "maximumScreenSpaceError": 0.1,
          "luminanceAtZenith": 0.3,
          "mesh": "隔离带"
        },
        {
          "url": mapBaseUrl + "/data/tangshan_smart_ht_crossing/SideWalk/tileset.json",
          "lng": 118.1710039,
          "lat": 39.6742699,
          "alt": 0.25,
          "maximumScreenSpaceError": 0.1,
          "luminanceAtZenith": 0.3,
          "mesh": "人行道"
        },
        {
          "url": mapBaseUrl + "/data/tangshan_smart_ht_crossing/PedestRail/tileset.json",
          "lng": 118.1701766,
          "lat": 39.6742575,
          "alt": 0.81,
          "maximumScreenSpaceError": 0.1,
          "luminanceAtZenith": 0.3,
          "mesh": "护栏"
        }
      ]
    },
    {
      "id": "traMark",
      "layertype": 2,
      "layerName": "交通标线",
      "minheight": 0,
      "maxheight": 5000,
      "isLayerManager": true,
      "isLayerChecked": true,
      "isMonomer": true,
      "models": [
        {
          "url": mapBaseUrl + "/data/tangshan_smart_ht_crossing/TraMarkL/tileset.json",
          "lng": 118.1710016,
          "lat": 39.6742665,
          "alt": 0.25,
          "maximumScreenSpaceError": 0.1,
          "luminanceAtZenith": 0.3,
          "mesh": "标志线"
        },
        {
          "url": mapBaseUrl + "/data/tangshan_smart_ht_crossing/TraMarkA/tileset.json",
          "lng": 118.1709982,
          "lat": 39.6748161,
          "alt": 0.22,
          "maximumScreenSpaceError": 0.1,
          "luminanceAtZenith": 0.3,
          "mesh": "箭头"
        },
        {
          "url": mapBaseUrl + "/data/tangshan_smart_ht_crossing/TraMarkP/tileset.json",
          "lng": 118.1709158,
          "lat": 39.6742850,
          "alt": 0.28,
          "maximumScreenSpaceError": 0.1,
          "luminanceAtZenith": 0.3,
          "mesh": "地面文字"
        }
      ]
    },
    {
      "id": "SepFacilities",
      "layertype": 3,
      "layerName": "路侧设施设备",
      "minheight": 0,
      "maxheight": 5000,
      "isLayerManager": true,
      "isLayerChecked": true,
      "isMonomer": true,
      "models": [
        {
          "url": mapBaseUrl + "/data/tangshan_smart_ht_crossing/SignStrct/tileset.json",
          "lng": 118.1710951,
          "lat": 39.6742541,
          "alt": 4.45,
          "maximumScreenSpaceError": 0.1,
          "luminanceAtZenith": 0.3,
          "mesh": "支撑杆"
        },
        {
          "url": mapBaseUrl + "/data/tangshan_smart_ht_crossing/StreetLight/tileset.json",
          "lng": 118.1710956,
          "lat": 39.6742425,
          "alt": 6.15,
          "maximumScreenSpaceError": 0.1,
          "luminanceAtZenith": 0.3,
          "mesh": "路灯"
        },
        // {
        //     "url": mapBaseUrl + "/data/tangshan_smart_ht_crossing/TrafficLight/tileset.json",
        //     "lng": 118.1724151,
        //     "lat": 39.6742988,
        //     "alt": 4.51,
        //     "maximumScreenSpaceError": 0.1,
        //     "luminanceAtZenith": 0.3,
        //     "mesh": "信号灯"
        // },
        {
          "url": mapBaseUrl + "/data/tangshan_smart_ht_crossing/TrafficSign/tileset.json",
          "lng": 118.1710947,
          "lat": 39.6742543,
          "alt": 4.2,
          "maximumScreenSpaceError": 0.1,
          "luminanceAtZenith": 0.3,
          "mesh": "标牌"
        },
        {
          "url": mapBaseUrl + "/data/tangshan_smart_ht_crossing/VideoCamera/tileset.json",
          "lng": 118.1710964,
          "lat": 39.6745688,
          "alt": 5.92,
          "maximumScreenSpaceError": 0.1,
          "luminanceAtZenith": 0.3,
          "mesh": "监控"
        },
        {
          "url": mapBaseUrl + "/data/tangshan_smart_ht_crossing/PlatForm/tileset.json",
          "lng": 118.1711904,
          "lat": 39.6740892,
          "alt": 2.32,
          "maximumScreenSpaceError": 0.1,
          "luminanceAtZenith": 0.3,
          "mesh": "公交站台"
        },
        {
          "url": mapBaseUrl + "/data/tangshan_smart_ht_crossing/VMS/tileset.json",
          "lng": 118.1709414,
          "lat": 39.6747044,
          "alt": 5.72,
          "maximumScreenSpaceError": 0.1,
          "luminanceAtZenith": 0.3,
          "mesh": "可变信息屏"
        },
        {
          "url": mapBaseUrl + "/data/tangshan_smart_ht_crossing/xinhaojigui/tileset.json",
          "lng": 118.1707617,
          "lat": 39.6738689,
          "alt": 1.32,
          "maximumScreenSpaceError": 0.1,
          "luminanceAtZenith": 0.3,
          "mesh": "信号机柜"
        },
        {
          "url": mapBaseUrl + "/data/tangshan_smart_ht_crossing/quanxiganzhiyitiji/tileset.json",
          "lng": 118.1709264,
          "lat": 39.6743014,
          "alt": 5.77,
          "maximumScreenSpaceError": 0.1,
          "luminanceAtZenith": 0.3,
          "mesh": "全息感知一体机"
        },
        {
          "url": mapBaseUrl + "/data/tangshan_smart_ht_crossing/quanchangjingganzhixiangji/tileset.json",
          "lng": 118.1708640,
          "lat": 39.6742729,
          "alt": 5.59,
          "maximumScreenSpaceError": 0.1,
          "luminanceAtZenith": 0.3,
          "mesh": "全场景感知相机"
        }
      ]
    },
    {
      "id": "buildings",
      "layertype": 4,
      "layerName": "建筑",
      "minheight": 0,
      "maxheight": 10000,
      "isLayerManager": true,
      "isLayerChecked": true,
      "isMonomer": true,
      "models": [
        {
          "url": mapBaseUrl + "/data/tangshan_smart_ht_crossing/Build/tileset.json",
          "lng": 118.1709939,
          "lat": 39.6742067,
          "alt": 36.31,
          "maximumScreenSpaceError": 0.1,
          "luminanceAtZenith": 0.3,
          "mesh": "建筑"
        }
      ]
    },
    {
      "id": "ground",
      "layertype": 5,
      "layerName": "地面",
      "minheight": 0,
      "maxheight": 10000,
      "isLayerManager": true,
      "isLayerChecked": true,
      "isMonomer": true,
      "models": [
        {
          "url": mapBaseUrl + "/data/tangshan_smart_ht_crossing/Ground/tileset.json",
          "lng": 118.1710072,
          "lat": 39.6742656,
          "alt": 0.89,
          "maximumScreenSpaceError": 0.1,
          "luminanceAtZenith": 0.3,
          "mesh": "地面"
        }
      ]
    },
    {
      "id": "trees",
      "layertype": 6,
      "layerName": "树木",
      "minheight": 0,
      "maxheight": 10000,
      "isLayerManager": true,
      "isLayerChecked": true,
      "isMonomer": true,
      "models": [
        {
          "url": mapBaseUrl + "/data/tangshan_smart_ht_crossing/Tree/tileset.json",
          "lng": 118.1710338,
          "lat": 39.6742518,
          "alt": 5.51,
          "maximumScreenSpaceError": 0.1,
          "luminanceAtZenith": 0.3,
          "mesh": "树木"
        }
      ]
    }
  ]
}

//车辆模型地址
const defaultConfig = {
  "relOrigin": [120.439343385907, 31.5862634870285, 0],
  "relRotation": [0, 0, 0],
  "vehType": {
    "100": [
      mapBaseUrl + "/data/gltf/vehicle/car/benz001.gltf",
      mapBaseUrl + "/data/gltf/vehicle/car/benz002.gltf",
      mapBaseUrl + "/data/gltf/vehicle/car/benz003.gltf",
      mapBaseUrl + "/data/gltf/vehicle/car/car0510.gltf",
      mapBaseUrl + "/data/gltf/vehicle/car/carBlack.gltf",
      mapBaseUrl + "/data/gltf/vehicle/car/redcar_001.gltf",
      mapBaseUrl + "/data/gltf/vehicle/car/suv_001.gltf"
    ],
    "200": [
      mapBaseUrl + "/data/gltf/vehicle/truck/Truck_001.gltf",
      mapBaseUrl + "/data/gltf/vehicle/truck/Truck_002.gltf",
      mapBaseUrl + "/data/gltf/vehicle/truck/Truck04_001.gltf",
      mapBaseUrl + "/data/gltf/vehicle/truck/Truck04_002.gltf"
    ],
    "300": [
      mapBaseUrl + "/data/gltf/vehicle/bus/Bus_001.gltf",
      mapBaseUrl + "/data/gltf/vehicle/bus/Bus_002.gltf",
      mapBaseUrl + "/data/gltf/vehicle/bus/Bus_003.gltf",
      mapBaseUrl + "/data/gltf/vehicle/bus/Bus_004.gltf"
    ],
    "400": [
      mapBaseUrl + "/data/gltf/vehicle/LanChe/LanChe_001.gltf"
    ],
    "610": [
      mapBaseUrl + "/data/gltf/vehicle/moto/motorcycle.gltf"
    ],
    "600": [
      mapBaseUrl + "/data/gltf/vehicle/moto/motorcyclePerson.gltf"
    ],
    "700": [
      mapBaseUrl + "/data/gltf/person/mashan_ren.gltf"
    ],
  },
  "signalImgUrl": {
    "RED": mapBaseUrl + "/static/Assets/Images/timeboard/R.png",
    "YELLOW": mapBaseUrl + "/static/Assets/Images/timeboard/Y.png",
    "GREEN": mapBaseUrl + "/static/Assets/Images/timeboard/G.png"
  },
  "heightOffset1031": -22,
  "heightOffset1104_1": -22,
  "heightOffset1104_2": -23,
  "heightOffset": 0,
  "heightScale": 1.37,
  "defatultHelight": 15,
  "disPoint": {
    "bigScreen": 0.4,
    "normal": 1
  }
}
//灯态模型地址
const lightConfig = {
  combination: mapBaseUrl + "/data/gltf/signal/xhd_combin.gltf",//判断组合而非组合
  goStraight: mapBaseUrl + "/data/gltf/signal/xishan_yuanpan.gltf",//判断直行
  turnLeft: mapBaseUrl + "/data/gltf/signal/xishan_jiantoudeng.gltf",
  turnRight: mapBaseUrl + "/data/gltf/signal/xishan_jiantoudeng_right.gltf"//右转
}


export {
  systemConfig,
  aboutConfig,
  // wmsOptions,
  commonStaticField,
  skyUrl,
  imgVideoWS,
  carWS,
  stageWS,
  lightWS,
  edestrianWS,
  pedestrianWS,
  mapConfig,
  // crossMapHeight,
  defaultConfig,
  lightConfig
}